<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/1/6
 * Time: 19:14
 */

namespace App;


use Illuminate\Database\Eloquent\Model;

class Vip extends Model
{
    // 表名称
    protected $table = 'vip';
    // 开启自动时间戳
    public $timestamps = true;
    // 日期都存储为时间戳
    protected $dateFormat = 'U';

    public function vipCard()
    {
        return $this->belongsTo('App\VipCard', 'vip_card_id', 'id');
    }

    public function user()
    {
        return $this->belongsTo('App\Users', 'user_id', 'id');
    }
}